﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 构造函数
{
    class Program
    {
        static void Main(string[] args)
        {
            Person p1 = new Person();
            Person p2 = new Person("kate");
            Console.WriteLine(p1.Name);
            Console.WriteLine(p2.Name);
        }
    }

    class Person
    {
        public string Name
        {
            get;
            set;
        }

        public Person()
        {

        }

        public Person(string name)
        {
            Name = name;
        }
    }
}
